import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '参数code',
    dataIndex: 'paraCode'
   },
   {
    title: '来源XML的ID',
    dataIndex: 'xmlId'
   },
   {
    title: '参数名字',
    dataIndex: 'paraName'
   },
   {
    title: '参数类型',
    dataIndex: 'paraType'
   },
   {
    title: '比特位',
    dataIndex: 'bit'
   },
   {
    title: '单位',
    dataIndex: 'unit'
   },
   {
    title: '排序',
    dataIndex: 'sort'
   },
   {
    title: '范围',
    dataIndex: 'paraRange'
   },
   {
    title: '删除标记 0否 1是',
    dataIndex: 'delFlag'
   },
   {
    title: '参数标记 (sys)系统参数 (user)自定义参数',
    dataIndex: 'paraFlag'
   },
   {
    title: '自定义参数公式',
    dataIndex: 'func'
   },
   {
    title: '系统id 逗号分隔',
    dataIndex: 'idFunc'
   },
   {
    title: '进制，1:浮点数2:16进制 3:时间码4:10进制 5:2进制 6:其他',
    dataIndex: 'binaryCode'
   },
   {
    title: '频率',
    dataIndex: 'frequency'
   },
   {
    title: '图像参数的意义',
    dataIndex: 'meaning'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '参数code',
    field: 'paraCode',
    component: 'Input'
  },
 {
    label: '来源XML的ID',
    field: 'xmlId',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '参数code',
    field: 'paraCode',
    component: 'Input',
  },
  {
    label: '来源XML的ID',
    field: 'xmlId',
    component: 'Input',
  },
  {
    label: '参数名字',
    field: 'paraName',
    component: 'Input',
  },
  {
    label: '参数类型',
    field: 'paraType',
    component: 'Input',
  },
  {
    label: '比特位',
    field: 'bit',
    component: 'Input',
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
  },
  {
    label: '排序',
    field: 'sort',
    component: 'Input',
  },
  {
    label: '范围',
    field: 'paraRange',
    component: 'Input',
  },
  {
    label: '删除标记 0否 1是',
    field: 'delFlag',
    component: 'Input',
  },
  {
    label: '参数标记 (sys)系统参数 (user)自定义参数',
    field: 'paraFlag',
    component: 'Input',
  },
  {
    label: '自定义参数公式',
    field: 'func',
    component: 'Input',
  },
  {
    label: '系统id 逗号分隔',
    field: 'idFunc',
    component: 'Input',
  },
  {
    label: '进制，1:浮点数2:16进制 3:时间码4:10进制 5:2进制 6:其他',
    field: 'binaryCode',
    component: 'Input',
  },
  {
    label: '频率',
    field: 'frequency',
    component: 'Input',
  },
  {
    label: '图像参数的意义',
    field: 'meaning',
    component: 'Input',
  },
];
